home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / ASDebugging.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  6.5 KB  |  223 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ASDebugging.h
  3.  
  4.      Contains:    AppleScript Debugging Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __ASDEBUGGING__
  18. #define __ASDEBUGGING__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __FILES__
  24. #include <Files.h>
  25. #endif
  26. #ifndef __COMPONENTS__
  27. #include <Components.h>
  28. #endif
  29. #ifndef __APPLEEVENTS__
  30. #include <AppleEvents.h>
  31. #endif
  32. #ifndef __APPLESCRIPT__
  33. #include <AppleScript.h>
  34. #endif
  35.  
  36.  
  37.  
  38. #if PRAGMA_ONCE
  39. #pragma once
  40. #endif
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. #if PRAGMA_IMPORT
  47. #pragma import on
  48. #endif
  49.  
  50. #if PRAGMA_STRUCT_ALIGN
  51.     #pragma options align=mac68k
  52. #elif PRAGMA_STRUCT_PACKPUSH
  53.     #pragma pack(push, 2)
  54. #elif PRAGMA_STRUCT_PACK
  55.     #pragma pack(2)
  56. #endif
  57.  
  58. /**************************************************************************
  59.     Mode Flags
  60. **************************************************************************/
  61. /*     This mode flag can be passed to OSASetProperty or OSASetHandler
  62.     and will prevent properties or handlers from being defined in a context
  63.     that doesn't already have bindings for them. An error is returned if
  64.     a current binding doesn't already exist. 
  65. */
  66.  
  67. enum {
  68.     kOSAModeDontDefine            = 0x0001
  69. };
  70.  
  71. /**************************************************************************
  72.     Component Selectors
  73. **************************************************************************/
  74.  
  75. enum {
  76.     kASSelectSetPropertyObsolete = 0x1101,
  77.     kASSelectGetPropertyObsolete = 0x1101,
  78.     kASSelectSetHandlerObsolete    = 0x1103,
  79.     kASSelectGetHandlerObsolete    = 0x1104,
  80.     kASSelectGetAppTerminologyObsolete = 0x1105,
  81.     kASSelectSetProperty        = 0x1106,
  82.     kASSelectGetProperty        = 0x1107,
  83.     kASSelectSetHandler            = 0x1108,
  84.     kASSelectGetHandler            = 0x1109,
  85.     kASSelectGetAppTerminology    = 0x110A,
  86.     kASSelectGetSysTerminology    = 0x110B,
  87.     kASSelectGetPropertyNames    = 0x110C,
  88.     kASSelectGetHandlerNames    = 0x110D
  89. };
  90.  
  91. /**************************************************************************
  92.     Context Accessors
  93. **************************************************************************/
  94. EXTERN_API( OSAError )
  95. OSASetProperty                    (ComponentInstance         scriptingComponent,
  96.                                  long                     modeFlags,
  97.                                  OSAID                     contextID,
  98.                                  const AEDesc *            variableName,
  99.                                  OSAID                     scriptValueID)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x1106, 0x7000, 0xA82A);
  100.  
  101. EXTERN_API( OSAError )
  102. OSAGetProperty                    (ComponentInstance         scriptingComponent,
  103.                                  long                     modeFlags,
  104.                                  OSAID                     contextID,
  105.                                  const AEDesc *            variableName,
  106.                                  OSAID *                resultingScriptValueID)                FIVEWORDINLINE(0x2F3C, 0x0010, 0x1107, 0x7000, 0xA82A);
  107.  
  108. EXTERN_API( OSAError )
  109. OSAGetPropertyNames                (ComponentInstance         scriptingComponent,
  110.                                  long                     modeFlags,
  111.                                  OSAID                     contextID,
  112.                                  AEDescList *            resultingPropertyNames)                FIVEWORDINLINE(0x2F3C, 0x000C, 0x110C, 0x7000, 0xA82A);
  113.  
  114. EXTERN_API( OSAError )
  115. OSASetHandler                    (ComponentInstance         scriptingComponent,
  116.                                  long                     modeFlags,
  117.                                  OSAID                     contextID,
  118.                                  const AEDesc *            handlerName,
  119.                                  OSAID                     compiledScriptID)                    FIVEWORDINLINE(0x2F3C, 0x0010, 0x1108, 0x7000, 0xA82A);
  120.  
  121. EXTERN_API( OSAError )
  122. OSAGetHandler                    (ComponentInstance         scriptingComponent,
  123.                                  long                     modeFlags,
  124.                                  OSAID                     contextID,
  125.                                  const AEDesc *            handlerName,
  126.                                  OSAID *                resultingCompiledScriptID)            FIVEWORDINLINE(0x2F3C, 0x0010, 0x1109, 0x7000, 0xA82A);
  127.  
  128. EXTERN_API( OSAError )
  129. OSAGetHandlerNames                (ComponentInstance         scriptingComponent,
  130.                                  long                     modeFlags,
  131.                                  OSAID                     contextID,
  132.                                  AEDescList *            resultingHandlerNames)                FIVEWORDINLINE(0x2F3C, 0x000C, 0x110D, 0x7000, 0xA82A);
  133.  
  134. EXTERN_API( OSAError )
  135. OSAGetAppTerminology            (ComponentInstance         scriptingComponent,
  136.                                  long                     modeFlags,
  137.                                  FSSpec *                fileSpec,
  138.                                  short                     terminologyID,
  139.                                  Boolean *                didLaunch,
  140.                                  AEDesc *                terminologyList)                    FIVEWORDINLINE(0x2F3C, 0x0012, 0x110A, 0x7000, 0xA82A);
  141.  
  142. /* Errors:
  143.        errOSASystemError        operation failed
  144.     */
  145. EXTERN_API( OSAError )
  146. OSAGetSysTerminology            (ComponentInstance         scriptingComponent,
  147.                                  long                     modeFlags,
  148.                                  short                     terminologyID,
  149.                                  AEDesc *                terminologyList)                    FIVEWORDINLINE(0x2F3C, 0x000A, 0x110B, 0x7000, 0xA82A);
  150.  
  151. /* Errors:
  152.        errOSASystemError        operation failed
  153.     */
  154. /* Notes on terminology ID
  155.  
  156.     A terminology ID is derived from script code and language code
  157.     as follows;
  158.  
  159.         terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
  160. */
  161.  
  162. /**************************************************************************
  163.     Obsolete versions provided for backward compatibility:
  164. */
  165. EXTERN_API( OSAError )
  166. ASSetProperty                    (ComponentInstance         scriptingComponent,
  167.                                  OSAID                     contextID,
  168.                                  const AEDesc *            variableName,
  169.                                  OSAID                     scriptValueID)                        FIVEWORDINLINE(0x2F3C, 0x000C, 0x1101, 0x7000, 0xA82A);
  170.  
  171. EXTERN_API( OSAError )
  172. ASGetProperty                    (ComponentInstance         scriptingComponent,
  173.                                  OSAID                     contextID,
  174.                                  const AEDesc *            variableName,
  175.                                  OSAID *                resultingScriptValueID)                FIVEWORDINLINE(0x2F3C, 0x000C, 0x1102, 0x7000, 0xA82A);
  176.  
  177. EXTERN_API( OSAError )
  178. ASSetHandler                    (ComponentInstance         scriptingComponent,
  179.                                  OSAID                     contextID,
  180.                                  const AEDesc *            handlerName,
  181.                                  OSAID                     compiledScriptID)                    FIVEWORDINLINE(0x2F3C, 0x000C, 0x1103, 0x7000, 0xA82A);
  182.  
  183. EXTERN_API( OSAError )
  184. ASGetHandler                    (ComponentInstance         scriptingComponent,
  185.                                  OSAID                     contextID,
  186.                                  const AEDesc *            handlerName,
  187.                                  OSAID *                resultingCompiledScriptID)            FIVEWORDINLINE(0x2F3C, 0x000C, 0x1104, 0x7000, 0xA82A);
  188.  
  189. EXTERN_API( OSAError )
  190. ASGetAppTerminology                (ComponentInstance         scriptingComponent,
  191.                                  FSSpec *                fileSpec,
  192.                                  short                     terminologID,
  193.                                  Boolean *                didLaunch,
  194.                                  AEDesc *                terminologyList)                    FIVEWORDINLINE(0x2F3C, 0x000E, 0x1105, 0x7000, 0xA82A);
  195.  
  196. /* Errors:
  197.         errOSASystemError        operation failed
  198.     */
  199. /**************************************************************************/
  200.  
  201.  
  202.  
  203. #if PRAGMA_STRUCT_ALIGN
  204.     #pragma options align=reset
  205. #elif PRAGMA_STRUCT_PACKPUSH
  206.     #pragma pack(pop)
  207. #elif PRAGMA_STRUCT_PACK
  208.     #pragma pack()
  209. #endif
  210.  
  211. #ifdef PRAGMA_IMPORT_OFF
  212. #pragma import off
  213. #elif PRAGMA_IMPORT
  214. #pragma import reset
  215. #endif
  216.  
  217. #ifdef __cplusplus
  218. }
  219. #endif
  220.  
  221. #endif /* __ASDEBUGGING__ */
  222.  
  223.